<div class="row-fluid">
    <div class="span12">
        <div class="page-header">
            <h1>
                Question
                <a href="admin/question/add-form.html" id="add" class="btn btn-success" style="float: right;">+ Add</a>
            </h1>
        </div>
    </div>
</div>
<div class="row-fluid">
    <table class="table table-striped">
        <thead>
            <th width="30">ID</th>
            <th>Question</th>
            <th>Remark</th>
            <th>Answer 1</th>
            <th>Answer 2</th>
            <th>Answer 3</th>
            <th>Answer 4</th>
            <th>Edit</th>
            <th>Delete</th>
        </thead>
        <tbody>
            {loop="questions"}
                <tr>
                    <td style="vertical-align: middle;">{$value.id}</td>
                    <td>
                        <img src="img/ajax-loader.gif" data-original="{$site_url}assets/images/questions/{$value.id}/{$value.question_img}" style="height: 77px;" />
                    </td>
                    <td>
                        {$value.remark}
                    </td>
                    <td>
                        <img src="img/ajax-loader.gif" data-original="{$site_url}assets/images/questions/{$value.id}/{$value.answer_1.img}" {if="$value.correct_id == 1"}class="answer-corect"{/if} />
                    </td>
                    <td>
                        <img src="img/ajax-loader.gif" data-original="{$site_url}assets/images/questions/{$value.id}/{$value.answer_2.img}" {if="$value.correct_id == 2"}class="answer-corect"{/if} />
                    </td>
                    <td>
                        <img src="img/ajax-loader.gif" data-original="{$site_url}assets/images/questions/{$value.id}/{$value.answer_3.img}" {if="$value.correct_id == 3"}class="answer-corect"{/if} />
                    </td>
                    <td>
                        <img src="img/ajax-loader.gif" data-original="{$site_url}assets/images/questions/{$value.id}/{$value.answer_4.img}" {if="$value.correct_id == 4"}class="answer-corect"{/if} />
                    </td>
                    <td style="vertical-align: middle;">
                        <a href="admin/question/{$value.id}" title="Edit"><i class="icon icon-edit"></i></a>
                    </td>
                    <td style="vertical-align: middle; text-align: center;">
                        <a href="admin/question/delete/{$value.id}" title="Delete"><i class="icon icon-remove"></i></a>
                    </td>
                </tr>
            {/loop}
        </tbody>
    </table>
    <script type="text/javascript">
    $(function() {
      $('table img').lazyload();
    })
    </script>
</div>